home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_geomview.idb / usr / freeware / lib / geomview / maple / README.gvplot.z / README.gvplot
Encoding:
Text File  |  1999-01-26  |  8.1 KB  |  203 lines

  1.         gvplot, writeoogl -- Maple 3-D graphics in Geomview
  2.  
  3.         Contents:
  4.           Installation Outline
  5.           Maple's Library Directory
  6.           Configurable Settings in gvplot
  7.           Remote Display
  8.         
  9.  
  10.    This Maple package supports displaying Maple 3-D graphic objects (produced
  11. for example by Maple's plot3d function) in Geomview, and saving Maple graphics
  12. objects as Geomview-readable OOGL files.  Maple 2-D graphics aren't supported.
  13.  
  14.    This distribution (in src/bin/geomutil/maple2oogl in the Geomview source
  15. distribution) includes Maple source files.  You'll want to run Maple to
  16. produce library (.m) files from the source files, and possibly to install
  17. them in the Maple library directory to be accessible via readlib(gvplot).
  18. This process is handled by the "make install" command described here.
  19.  
  20.    Documentation for the package itself is available within Maple after
  21. installation; for example, type
  22.     readlib(gvplot);
  23.     ?gvplot
  24.  
  25.    To install this package:
  26.  
  27.       * Edit gvplot.mapleV3 or gvplot.mapleV4 (according to your version
  28.     of Maple), possibly changing the settings of
  29.     default_gvcommand and default_gvdirectories; see
  30.     "Configurable Settings" and "Remote Display", below.
  31.  
  32.       * Determine the directory into which new Maple library (.m) files
  33.     should be placed; see "Maple's Library Directory".
  34.     This will be the setting of MAPLE_LIB.  A typical value might be
  35.     /usr/local/maple/lib.
  36.  
  37.       * If geomview, togeomview, and remotegv aren't already on the
  38.     search path of everyone who'll want to use the program, determine
  39.     which directory they are (or will be) placed in, e.g. /usr/local/bin.
  40.     This will be the setting of BINDIR.
  41.  
  42.       * If you have the source distribution, edit makefiles/mk.site.default
  43.     (relative to the top of the geomview distribution) and set
  44.     MAPLE_LIB and BINDIR to the appropriate values.
  45.  
  46.       * Make sure "maple" is on your search path.
  47.  
  48.       * Run
  49.       make install
  50.     or, if you didn't set MAPLE_LIB and BINDIR in mk.site.default,
  51.     give those values explicitly on the "make" command line:
  52.  
  53.       make install MAPLE_LIB=maple_library_directory BINDIR=binary_directory
  54.  
  55.      Maple V4 users: since the Geometry Center doesn't have Maple V4,
  56.     we haven't been able to test that "make install" correctly determines
  57.     the version of Maple if you have release 4.  If you have trouble,
  58.     try invoking the MapleV4 installation directly with
  59.  
  60.       make install_v4 MAPLE_LIB=maple_lib_dir BINDIR=binary_dir
  61.  
  62.  
  63.             MAPLE'S LIBRARY DIRECTORY
  64.  
  65.    For convenient invocation, it's best to put the compiled Maple code for
  66. this package -- the file gvplot.m -- in some directory known to Maple.
  67. Users can then invoke it by typing
  68.  
  69.     readlib(gvplot);
  70.  
  71.    Since Maple V.2, Maple keeps a list of library directory names in the
  72. global variable "libname".  Its default value is typically the single
  73. directory `/usr/local/maple/lib`; you can check its actual value by
  74. running Maple and typing
  75.  
  76.     libname;
  77.  
  78.     You can configure Maple to add other directories (e.g. for locally-
  79. installed rather than Maple-supplied packages) to the libname list for all
  80. users.  Briefly, you create a "src" subdirectory of the default library
  81. directory (e.g.  /usr/local/maple/lib/src) and create a file there named
  82. "init" containing something like
  83.  
  84.    libname := libname, `/usr/local/maple/otherstuff`:
  85.  
  86. You could then place library files in /usr/local/maple/otherstuff, and/or set
  87.  
  88. MAPLE_LIB = /usr/local/maple/otherstuff
  89.  
  90. in makefiles/mk.site.default.
  91.  
  92.  
  93.  
  94.  
  95.             Configurable Settings in gvplot
  96.  
  97.    Two values in the "gvplot" script are configurable:
  98.  
  99.       default_gvcommand, the UNIX command used to invoke geomview.
  100.     It's normally "geomview", but might specify some geomview options,
  101.     or might be "remotegv" if you'll want to run maple on one system and
  102.     display via geomview on another.
  103.  
  104.       default_gvdirectories, the directory(ies) (in addition to those in the
  105.     normal UNIX search path) to find the programs "togeomview" and
  106.     "geomview".  There's no default; this is correct if these programs
  107.     are installed on everyone's search path, e.g. in /usr/local/bin.
  108.     This value is automatically configured as part of the "make install"
  109.     process and probably won't need to be messed with.
  110.     It can be set to a colon-separated list of directories.
  111.  
  112.     It can be useful to invoke something other than simply "geomview" to
  113. display Maple graphics; for example, one might start geomview with
  114. options to position its window, or with a special startup script.
  115. To adjust this, change the setting of "gvcommand" near line 45, as in
  116.     default_gvcommand := `geomview -nopanels -wpos 640x480@0,0`;
  117.  
  118. To regenerate the library (.m) file after such changes, start a fresh Maple
  119. session, read the source file, and save the library file:
  120.  
  121.     read(`gvplot`);
  122.     save(`/usr/local/maple/lib/gvplot.m`);
  123.  
  124.  
  125.  
  126.         REMOTE DISPLAY
  127.  
  128.  
  129. It's possible to run Maple on one system and display Geomview graphics
  130. on another.  This can sometimes be done by using the X "DISPLAY" environment
  131. variable, so that Maple and Geomview run on one machine but Geomview's windows
  132. appear elsewhere.  But for fastest graphics, it's better if you can run
  133. Geomview on the computer where the display is.
  134.  
  135. To have the gvplot package invoke Geomview on another machine,
  136. make it invoke "remotegv" rather than "geomview".
  137. You can make "remotegv" the default for all gvplot users by editing 
  138. the gvplot source and changing the setting of "default_gvcommand" near line 45.
  139. Or, a user can adjust the setting of "gvcommand" within each session,
  140. saying e.g.
  141.    readlib(gvplot);
  142.    gvcommand := `remotegv -h slevy@gauss`;
  143.  
  144. remotegv attempts to guess which machine to invoke geomview on by
  145. examining the DISPLAY environment variable.  If DISPLAY isn't set or
  146. if geomview should run on a different machine, use the -h host option.
  147.  
  148. The script also assumes that geomview should display on the machine where
  149. it is invoked, so for that copy of geomview, it sets DISPLAY to ":0".
  150. If the display should appear elsewhere (on an X terminal, say),
  151. use the -display option.
  152.  
  153. Remotegv uses "rsh" (remote shell) to pass data to the other computer, so 
  154. the remote computer must allow this -- either with an entry in
  155. /etc/hosts.equiv, or in a .rhosts file in the user's home directory
  156. on the machine where geomview will run.  The account name on the other
  157. machine is assumed to be the same as on this machine; if different,
  158. use the -l username or -h username@othermachine options.
  159.  
  160. In case permissions are not set up correctly, the symptom
  161. is liable to be a "Permission denied." message followed by the
  162. immediate termination of the Maple process -- so if you're using it for
  163. the first time, check it out before doing much else in your Maple session!
  164. Sorry, but MapleV3 is just not very good at connecting to other programs.
  165.  
  166. Note that togeomview and geomview MUST BE IN THE USER'S DEFAULT SEARCH PATH
  167. on the remote machine.
  168.  
  169. To use this script within Maple, you'd say:
  170.    readlib(gvplot);
  171. then
  172.    gvcommand := `remotegv`;
  173. or e.g.
  174.    gvcommand := `remotegv -h othermachine -display myxterm:0`;
  175. or, if the account on the other machine is different from yours,
  176.    gvcommand := `remotegv -l otheraccount`;
  177. or
  178.    gvcommand := `remotegv -h otheraccount@othermachine`;
  179. Following any remotegv options, you can add the command to be invoked as
  180. geomview, possibly including options, as in:
  181.    gvcommand := `remotegv -l person /u/person/bin/geomview -wpos 300x200`;
  182.  
  183. Once gvcommand is properly set, you can use gvplot() as usual.
  184.  
  185. Normally, error messages reporting problems on the other machine (for
  186. example, being unable to run geomview) are suppressed; this is unfortunately
  187. necessary, or you'd never get another Maple prompt until quitting from
  188. geomview.  There's a test mode to aid in tracing problems; use it as in
  189.    gvcommand := `remotegv -test -h othermachine`;
  190. i.e. add "-test" to whatever other options you'd give to remotegv.
  191.  
  192. Summary of remotegv options:
  193.     -l user  or  -l user@host
  194.     -h host  or  -h user@host
  195.     -display host:number        (set display on remote end)
  196.     -test
  197.     also accepts togeomview's options (-g, -M[c][g][p][s]).
  198.     Invokes rsh to specified machine, invokes togeomview there by default.
  199.     By default, we assume DISPLAY points to the machine where we'd like to be;
  200.       -h {host-portion-of-DISPLAY} -display :0
  201.     Incorporates settings from "$RGVOPTS" environment variable.
  202.  
  203.